/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package liftsimulator;

import java.util.Random;

/**
 *
 * @author James Barker
 */
public class Person {
    int id;
    int startFloor;
    int destFloor;
    String direction;
    String status;
    
    public Person(int startFloor, int destFloor) {
        this.startFloor = startFloor;
        this.destFloor = destFloor;
        status = "IN";
        setDirection();
        genSetUserID();
    }
    
    public void genSetUserID(){
      Random randomGenerator = new Random();
        id = randomGenerator.nextInt(10000); 
        this.id = id;
    }
    public void setDirection(){
        if (startFloor > destFloor) {
            direction = "DOWN";
        }
        else
        {
            direction = "UP";
        }
    }

    public String getDirection() {
        return direction;
    }

    public int getId() {
        return id;
    }

    public String getStatus() {
        return this.status;
    }
    public void setStatus(String status){
        this.status = status;
    }
    
    public void setStartFloor(int sFloor){
        this.startFloor = sFloor;
    }
    
        public void setDestFloor(int dFloor){
        this.destFloor = dFloor;       
    }

    public int getStartFloor() {
        return this.startFloor;
    }
    
    public int getDestFloor() {
        return this.destFloor;
    }
}
